package com.example.demo.mapper;

import com.example.demo.model.User;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Mapper
public interface UserMapper {

    List<User> selectAll();

    Integer insertUser(User user);

    User selectUserById(@Param("id") Integer id);

    Integer updateUserById(User user);

    Integer deleteUser(@Param("u_id") Integer id);

    Integer insertUser2(@Param("userinfo") User user);

    List<User> queryByLike(@Param("name") String name);


}
